<template>
    <div>
        <van-search v-model="value" shape="round" background="#4fc08d" placeholder="请输入搜索关键词" />

        <van-cell-group v-for="item in ss">
            <router-link :to="{ name: 'xq', params: { goods_id: item.goods_id } }">
                <van-cell :title="item.goods_name" value="内容" />
            </router-link>


        </van-cell-group>
    </div>
</template>

<script setup>
import { qsearchApi } from '@/api/api';
import { ref, watch } from 'vue';
let ss = ref([]);
let value = ref('');

watch((value), val => {
    qsearchApi(val).then(res => {
        console.log(res);
        ss.value = res.data.message;

    })

})



</script>

<style lang="scss" scoped></style>